home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / pipnss / nsICMSEncoder.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  134 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICMSEncoder.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICMSEncoder_h__
  6. #define __gen_nsICMSEncoder_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. typedef void (*NSSCMSContentCallback)(void *arg, const char *buf, unsigned long len);
  18. #define NS_CMSENCODER_CONTRACTID "@mozilla.org/nsCMSEncoder;1"
  19. class nsICMSMessage; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsICMSEncoder */
  23. #define NS_ICMSENCODER_IID_STR "a15789aa-8903-462b-81e9-4aa2cff4d5cb"
  24.  
  25. #define NS_ICMSENCODER_IID \
  26.   {0xa15789aa, 0x8903, 0x462b, \
  27.     { 0x81, 0xe9, 0x4a, 0xa2, 0xcf, 0xf4, 0xd5, 0xcb }}
  28.  
  29. /**
  30.  * nsICMSEncoder
  31.  *  Interface to Encode an CMS message
  32.  */
  33. class NS_NO_VTABLE nsICMSEncoder : public nsISupports {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICMSENCODER_IID)
  37.  
  38.   /* void start (in nsICMSMessage aMsg, in NSSCMSContentCallback cb, in voidPtr arg); */
  39.   NS_IMETHOD Start(nsICMSMessage *aMsg, NSSCMSContentCallback cb, void * arg) = 0;
  40.  
  41.   /* void update (in string aBuf, in long aLen); */
  42.   NS_IMETHOD Update(const char *aBuf, PRInt32 aLen) = 0;
  43.  
  44.   /* void finish (); */
  45.   NS_IMETHOD Finish(void) = 0;
  46.  
  47.   /* void encode (in nsICMSMessage aMsg); */
  48.   NS_IMETHOD Encode(nsICMSMessage *aMsg) = 0;
  49.  
  50. };
  51.  
  52. /* Use this macro when declaring classes that implement this interface. */
  53. #define NS_DECL_NSICMSENCODER \
  54.   NS_IMETHOD Start(nsICMSMessage *aMsg, NSSCMSContentCallback cb, void * arg); \
  55.   NS_IMETHOD Update(const char *aBuf, PRInt32 aLen); \
  56.   NS_IMETHOD Finish(void); \
  57.   NS_IMETHOD Encode(nsICMSMessage *aMsg); 
  58.  
  59. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  60. #define NS_FORWARD_NSICMSENCODER(_to) \
  61.   NS_IMETHOD Start(nsICMSMessage *aMsg, NSSCMSContentCallback cb, void * arg) { return _to Start(aMsg, cb, arg); } \
  62.   NS_IMETHOD Update(const char *aBuf, PRInt32 aLen) { return _to Update(aBuf, aLen); } \
  63.   NS_IMETHOD Finish(void) { return _to Finish(); } \
  64.   NS_IMETHOD Encode(nsICMSMessage *aMsg) { return _to Encode(aMsg); } 
  65.  
  66. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  67. #define NS_FORWARD_SAFE_NSICMSENCODER(_to) \
  68.   NS_IMETHOD Start(nsICMSMessage *aMsg, NSSCMSContentCallback cb, void * arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(aMsg, cb, arg); } \
  69.   NS_IMETHOD Update(const char *aBuf, PRInt32 aLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->Update(aBuf, aLen); } \
  70.   NS_IMETHOD Finish(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Finish(); } \
  71.   NS_IMETHOD Encode(nsICMSMessage *aMsg) { return !_to ? NS_ERROR_NULL_POINTER : _to->Encode(aMsg); } 
  72.  
  73. #if 0
  74. /* Use the code below as a template for the implementation class for this interface. */
  75.  
  76. /* Header file */
  77. class nsCMSEncoder : public nsICMSEncoder
  78. {
  79. public:
  80.   NS_DECL_ISUPPORTS
  81.   NS_DECL_NSICMSENCODER
  82.  
  83.   nsCMSEncoder();
  84.  
  85. private:
  86.   ~nsCMSEncoder();
  87.  
  88. protected:
  89.   /* additional members */
  90. };
  91.  
  92. /* Implementation file */
  93. NS_IMPL_ISUPPORTS1(nsCMSEncoder, nsICMSEncoder)
  94.  
  95. nsCMSEncoder::nsCMSEncoder()
  96. {
  97.   /* member initializers and constructor code */
  98. }
  99.  
  100. nsCMSEncoder::~nsCMSEncoder()
  101. {
  102.   /* destructor code */
  103. }
  104.  
  105. /* void start (in nsICMSMessage aMsg, in NSSCMSContentCallback cb, in voidPtr arg); */
  106. NS_IMETHODIMP nsCMSEncoder::Start(nsICMSMessage *aMsg, NSSCMSContentCallback cb, void * arg)
  107. {
  108.     return NS_ERROR_NOT_IMPLEMENTED;
  109. }
  110.  
  111. /* void update (in string aBuf, in long aLen); */
  112. NS_IMETHODIMP nsCMSEncoder::Update(const char *aBuf, PRInt32 aLen)
  113. {
  114.     return NS_ERROR_NOT_IMPLEMENTED;
  115. }
  116.  
  117. /* void finish (); */
  118. NS_IMETHODIMP nsCMSEncoder::Finish()
  119. {
  120.     return NS_ERROR_NOT_IMPLEMENTED;
  121. }
  122.  
  123. /* void encode (in nsICMSMessage aMsg); */
  124. NS_IMETHODIMP nsCMSEncoder::Encode(nsICMSMessage *aMsg)
  125. {
  126.     return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128.  
  129. /* End of implementation class template. */
  130. #endif
  131.  
  132.  
  133. #endif /* __gen_nsICMSEncoder_h__ */
  134.